package dmitrygusev.nanoxml;

import dmitrygusev.nanoxml.lite.XMLElement;

public class XMLUtils {

	public static XMLElement createElement(String tagName) {
		 XMLElement result = new XMLElement();
		 result.setName(tagName);
		 return result;
	}

	public static XMLElement createChildElement(XMLElement parent, String childName) {
		XMLElement child = createElement(childName);
		parent.addChild(child);
		return child;
	}

	public static XMLElement createElementFromString(String xml) {
		XMLElement result = new XMLElement();
		result.parseString(xml);
		return result;
	}

}
